from interactive import *

#1)

css("#ColonyView")
linkpart("EPO").click()
twait()

css("#ColonyMenu")
linkpart("Reschedule").click()
twait()
alert = driver.switch_to_alert()
assert(alert.text == "Successfully rescheduled.")
alert.accept()

linkpart("Experiments").click()
twait()

linkpart("Alpha").click()
twait()

linkpart("Alpha 1").click()
twait()

css("#InterventionList li").click()
twait()

InterventionID = css("#InterventionDetail #ID").get_attribute("value")

MouseID = css("#InterventionDetail #MouseID").get_attribute("value")

css("#InterventionDetail #MouseIDButton").click()
twait()

assert(css("#MouseDetail #ID").get_attribute("value") == MouseID)
twait()

Edit()
twait()

css("#MouseDetail #interventionButton").click()
twait()

assert(css("#InterventionDetail #ID").get_attribute("value") == InterventionID)

assert(css("#InterventionDetail #MouseID").get_attribute("value") == MouseID)

driver.quit()

